package proxy;

import java.lang.reflect.Proxy;

public class ProxyTest {
	public static void main(String[] args) {
		MyService myService=new MyServiceImpl();
		MyInvocationHandler handler=new MyInvocationHandler(myService);
		MyService myServiceProxy=(MyService) Proxy.newProxyInstance(MyService.class.getClassLoader(), 
				MyServiceImpl.class.getInterfaces(),handler);
		myServiceProxy.hello();	
	}
}
